﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.Entity;
using System.ComponentModel.DataAnnotations;

namespace VacationsRequest.Models
{
    public class VacationDay
    {
        public int ID { get; set; }
        public int IdEmployee { get; set; }

        [DataType(DataType.Date)] 
        public DateTime Date { get; set; }
        public string Comment { get; set; }
        public Guid? IdApproval { get; set; }
    }

    public class VacationTimeSpan
    {
   
        public string Comment { get; set; }

        [Required(ErrorMessage = "A start date is required")]
        [DataType(DataType.Date)] 
        public DateTime FromDate { get; set; }

        [Required(ErrorMessage = "A end date is required")]
        [DataType(DataType.Date)] 
        public DateTime ToDate { get; set; }
    }

    public class VacationDayDBContext : DbContext
    {
        public DbSet<VacationDay> VacationDays { get; set; }
    }
}